package errCode

var errCode = make(map[int]string)

func init() {
	errCode[0] = "访问成功"
	errCode[500] = "系统错误"

	errCode[1001] = "缺少参数"
	errCode[1002] = "无此接口"
	errCode[1003] = "该接口不接受这种访问方式"
	errCode[1004] = "token失效"

	errCode[1100] = "无数据"
	errCode[1101] = "用户名或密码错误"
	errCode[1102] = "密钥过期"

}

func GetErrMsg(code int) string {
	if msg, ok := errCode[code]; ok {
		return msg
	} else {
		return "没有该错误码"
	}
}
